import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            int count = 0;
            String s1 = in.next();
            String s2 = in.next();;
            int len1 = s1.length();
            int len2 = s2.length();
            if (len1 >= len2) {
                int i = 0;
                int j = 0;
                while (i < len1 && j < len2) {
                    if (s1.charAt(i) == s2.charAt(j)) {
                        if (j == len2 - 1) {
                            count += 1;
                            j = 0;
                            i ++;
                        } else {
                            j ++;
                            i ++;
                        }
                    } else {
                        i++;
                        j = 0;
                    }
                }
            }
            System.out.println(count);
        }
    }
}
